package com.mmy.fta.usercenter.repository;

import com.mmy.fta.usercenter.entity.ShipperMembershipEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface ShipperMembershipEntityMapper {
    int insert(ShipperMembershipEntity record);

    int insertSelective(ShipperMembershipEntity record);

    ShipperMembershipEntity selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ShipperMembershipEntity record);

    int updateByPrimaryKey(ShipperMembershipEntity record);

    ShipperMembershipEntity selectByOpenId(String openId);

    int updateShipperNormalMember(ShipperMembershipEntity shipperMembershipEntity);

    int updateShipperColdMember(ShipperMembershipEntity shipperMembershipEntity);

    int selectShipperMemberShipType(String openId);

    int updateNormalMemberShipTime(String openId);

    int updateColdMemberShipTime(String openId);

    int insertNewShipperMember(ShipperMembershipEntity shipperMembershipEntity);

    int updateNormalMemberShipStatus(@Param("openId")String openId, @Param("times")int times);

    int updateNormalMemberShipStatus(String openId);

    int addShipperMemberMonthDeals(String shipperOpenId);

    int updateDriverCargoTimesAdd(String openId);

    void updateShipperSendCargoTimes(String openId);

    int updateDriverCargoTimesDeduct(String openId);

    ShipperMembershipEntity selectShipperMemberByOpenId(String openId);
}

